import { getAppData, setGlobalData } from '@utils/tools'
import { AtTabs, AtTabsPane, AtList } from "taro-ui"
import { BasePage } from '@common/components/base-page'
import List from '@components/list'
import type CustomTabBar from '../../custom-tab-bar'
import NavigationBar from '@components/navBar'
import CommonTabs from '@components/common-tabs'
import { View } from '@tarojs/components'
import Taro from '@tarojs/taro'
// import './index.scss'
import style from './index.module.scss'
export default class Task extends BasePage {
    componentDidShow() {
        let pageCtx = Taro.getCurrentInstance().page
        const tabbar = Taro.getTabBar<CustomTabBar>(pageCtx)
        tabbar?.switchTab(1)
        setGlobalData({
            tabIndex: 1
        })
    }
    handleTabs=()=>{

    }

    render() {
        const tabList= [{ title: '已报名',key:'0' }, { title: '进行中',key:'1' }, { title: '已结束',key:'2' }]
        return (
            <>
                <NavigationBar placeholder='请输入关键字' avatar={false}  inShowHeight={true} isDisabled={true} backPageShow={false} titleColor="white" barBackgroundColor='' title="" homeTitleSearchShow={true}></NavigationBar>
                <View className={style.taskCon}></View>
                <View className={style.main}>
                    <View className={style.top}>
                     <CommonTabs  tabList={tabList}/>
                     <List progress={true}/>
                    </View>
                </View>
            </>
            // <View onClick={this.handleClick}>任务中心页面</View>
        )
    }
}
